﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:Microsoft_Phone_Controls_Maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" mc:Ignorable="d">
	<DataTemplate x:Key="BingRouteDetailsDataTemplate">
		<StackPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="255"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30*"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="Compass Degrees:" />
                <TextBlock Text="{Binding CompassDegrees}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" />
                <TextBlock Text="Maneuver Type:" Grid.Row="1" />
                <TextBlock Text="{Binding ManeuverType}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="1" />
                <TextBlock Text="Mode:" Grid.Row="2" />
                <TextBlock Text="{Binding Mode}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="2" />
                <TextBlock Text="Names:" Grid.Row="3" />
                <TextBlock Text="{Binding NamesAsCsv}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="3" />
                <TextBlock Text="Road Type:" Grid.Row="4" />
                <TextBlock Text="{Binding RoadType}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="4" />
            </Grid>
		</StackPanel>
	</DataTemplate>
	<DataTemplate x:Key="BingRouteHintsDataTemplate">
		<StackPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="255"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30*"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="Hint Type:" />
                <TextBlock Text="{Binding HintType}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" />
                <TextBlock Text="Text:" Grid.Row="1" />
                <TextBlock Text="{Binding Text}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="1" />
            </Grid>
		</StackPanel>
	</DataTemplate>
	<DataTemplate x:Key="ItineraryItemsDataTemplate">
		<StackPanel Width="456">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30*"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="Travel Distance:" />
                <TextBlock Text="{Binding TravelDistance}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" />
                <TextBlock Text="Travel Duration:" Grid.Row="1" />
                <TextBlock Text="{Binding TravelDuration}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="1" />
                <TextBlock Text="Compass Direction:" Grid.Row="2" />
                <TextBlock Text="{Binding CompassDirection}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="2" />
                <TextBlock Text="Icon Type:" Grid.Row="3" />
                <TextBlock Text="{Binding IconType}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="3" />
                <TextBlock Text="Maneuver Type:" Grid.Row="4" />
                <TextBlock Text="{Binding Instruction.ManeuverType}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="4" />
                <TextBlock Text="Maneuver Text:" Grid.Row="5" />
                <TextBlock Text="{Binding Instruction.Text}" Foreground="LightGreen"
                               TextAlignment="Right" TextWrapping="Wrap" Padding="0,0,20,0" Grid.Column="1" Grid.Row="5" />
                <TextBlock Text="Side Of Street:" Grid.Row="6" />
                <TextBlock Text="{Binding SideOfStreet}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" Grid.Row="6" />
            </Grid>            
			<ListBox ItemsSource="{Binding Details}" ItemTemplate="{StaticResource BingRouteDetailsDataTemplate}" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
			<ListBox ItemsSource="{Binding Hints}" ItemTemplate="{StaticResource BingRouteHintsDataTemplate}" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
			<ListBox ItemsSource="{Binding Signs}" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30*"></RowDefinition>
                    <RowDefinition Height="60"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="Signs:" />
                <TextBlock Text="{Binding SignsAsCsv}" Foreground="LightGreen"
                               TextAlignment="Right" Padding="0,0,20,0" Grid.Column="1" />
            </Grid>
        </StackPanel>
	</DataTemplate>
	<DataTemplate x:Key="RouteLegsDataTemplate">
		<Grid Width="456">
			<ListBox ItemsSource="{Binding ItineraryItems}" 
                     ItemTemplate="{StaticResource ItineraryItemsDataTemplate}" Height="400"/>
		</Grid>
	</DataTemplate>

    <DataTemplate x:Key="MapPinDataTemplate">
        <Microsoft_Phone_Controls_Maps:Pushpin Location="{Binding Path=ManeuverPoint}">
            <Microsoft_Phone_Controls_Maps:Pushpin.Content>
                <Grid HorizontalAlignment="Left">
                    <Border>
                        
                    </Border>
                </Grid>
            </Microsoft_Phone_Controls_Maps:Pushpin.Content>
        </Microsoft_Phone_Controls_Maps:Pushpin>
    </DataTemplate>

<DataTemplate x:Key="MapPinPhoneBookDataTemplate">
    <Microsoft_Phone_Controls_Maps:Pushpin Location="{Binding Path=Location}">
        <Microsoft_Phone_Controls_Maps:Pushpin.Content>
            <Grid HorizontalAlignment="Left">
                <Border>
                    <TextBlock Text="{Binding Business}" />
                </Border>
            </Grid>
        </Microsoft_Phone_Controls_Maps:Pushpin.Content>
    </Microsoft_Phone_Controls_Maps:Pushpin>
</DataTemplate>
    <!-- Resource dictionary entries should be defined here. -->

    <!--<DataTemplate x:Key="ProductsDataTemplate">
        <CheckBox Command="{Binding Main.SelectProduct, Source={StaticResource Locator}}"
                  CommandParameter="{Binding .}"
                  IsChecked="{Binding IsSelectedProduct, Mode=TwoWay}">
            <Image Source="{Binding PackImage}" />
        </CheckBox>
    </DataTemplate>-->
    
</ResourceDictionary>